package com.wzh.barchart;

import android.content.Context;
import android.util.DisplayMetrics;

/**
 * Created by 99210 on 2017/6/17.
 */

public class ScreenUtils {


    public static float[] getScreenSizeDp(Context context){
        DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
        float dpHeight = displayMetrics.heightPixels / displayMetrics.density;
        float dpWidth = displayMetrics.widthPixels / displayMetrics.density;
        return new float[]{dpWidth,dpHeight};
    }

}
